<template>
  <div class="EquipmentselectionList">
    <NavBar
      fixed
      placeholder
      title="设备选择"
      z-index="999"
      @click-right="onClickRight"
      ref="nav"
    >
      <template #left>
        <Icon
          name="arrow-left"
          size="0.53rem"
          color="#333333"
          @click="$router.back()"
        />
      </template>
    </NavBar>
    <Search
      v-model="search"
      background="#e1e1e1"
      placeholder="请输入搜索关键词"
      show-action
      @search="onSearch"
      @cancel="onCancel"
    />

    <List
      class="list"
      v-model="loading"
      :finished="finished"
      finished-text="没有更多了"
      @load="onLoad"
    >
      <div class="item" v-for="(item, i) in list" :key="i" @click="toJump">
        <div class="title flex">{{ item.title }}</div>
        <div class="name">{{ item.name }}</div>
      </div>
    </List>
  </div>
</template>

<script>
import { Search, NavBar, Icon, List, Cell } from "vant";
export default {
  props: {},
  data() {
    return {
      search: "",
      list: [
        { name: "张丽", title: "张" },
        { name: "王筝", title: "王" },
      ],
      loading: false,
      finished: false,
    };
  },

  created() {},
  mounted() {},
  watch: {},
  methods: {
    onLoad() {},
    onClickRight() {},
    onSearch() {},
    onCancel() {},
    toJump() {
      this.$router.back();
    },
  },
  components: { Search, NavBar, Icon, List, Cell },
};
</script>

<style scoped lang="less">
@import "~@/style/var.less";
.EquipmentselectionList {
  .flex {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  background-color: #f7f7f9;
  // /deep/.van-nav-bar__content {
  //   background-color: #3982f6;

  //   .van-nav-bar__title {
  //     color: #fff;
  //   }
  // }
  .list {
    margin-top: 20px;

    .item {
      width: 100%;
      height: 98px;
      border-top: 1px solid #eee;
      background-color: #fff;
      display: flex;
      align-items: center;
      .title {
        width: 52px;
        height: 52px;
        background: @primary;
        border-radius: 50%;
        font-size: 28px;
        font-family: PingFang SC;
        font-weight: 500;
        color: #ffffff;
        margin-left: 23px;
      }
      .name {
        margin-left: 31px;
        font-size: 28px;
        font-family: PingFang SC;
        font-weight: 500;
        color: #666666;
      }
    }
  }
}
</style>
